package tec;

class FauxPassager extends Passager {
   static final byte DEHORS = 0;
   static final byte ASSIS  = 1;
   static final byte DEBOUT = 2;

   int DESTINATION ;
   byte etat = DEHORS ;

   final Messages messages = new Messages();

   public void accepterPlaceAssise()
   {
      etat = ASSIS;
   }

   public void accepterPlaceDebout()
   {
      etat = DEBOUT;
   }

   public void accepterSortie()
   {
      etat = DEHORS;
   }

   public boolean estAssis()
   {
      return etat == ASSIS;
   }

   public boolean estDebout()
   {
      return etat == DEBOUT;
   }

   public boolean estDehors()
   {
      return etat == DEHORS;
   }

   public void nouvelArret(Bus bus, int numeroArret) 
   {
      if (numeroArret == DESTINATION)
      {
         etat = DEHORS;
      }
   }

   public void monterDans(Transport t){
   }

   public String nom(){
      return "toto";
   }


   public String toString()
   {
      return ("Destination: "+ DESTINATION 
            +" Etat: "+ etat +">");
   }
}








